<%@ Page Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true"
    CodeFile="TaxesByStateProvince.aspx.cs" Inherits="Tathata.Web.Administration.Administration_TaxesByStateProvince" %>

<%@ Import Namespace="Tathata.Common.BLL.Entities" %>
<asp:Content ID="c1" ContentPlaceHolderID="cph1" runat="Server">
    <h4>
        Taxes by state / province</h4>
    <br />
    <table>
        <tr>
            <td class="adminTitle">
                Select country:
            </td>
            <td class="adminData">
                <asp:DropDownList ID="ddlCountry" runat="server" CssClass="adminInput" AutoPostBack="true"
                    OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr runat="server" id="SelectStateProvinceDiv">
            <td class="adminTitle">
                Select state / province:
            </td>
            <td class="adminData">
                <asp:DropDownList ID="ddlStateProvince" runat="server" CssClass="adminInput" AutoPostBack="true"
                    OnSelectedIndexChanged="ddlStateProvince_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr runat="server" id="NoStateProvinceDiv">
            <td align="left" colspan="2">
                There are no states / provinces for the selected country:
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="gvTaxesByStateProvince" runat="server" AutoGenerateColumns="False"
        Width="100%">
        <Columns>
            <asp:BoundField DataField="TaxByStateProvinceID" HeaderText="TaxByStateProvinceID"
                Visible="False"></asp:BoundField>
            <asp:TemplateField HeaderText="Tax category" ItemStyle-Width="60%">
                <ItemTemplate>
                    <%#((TaxCategory)Eval("TaxCategory")).Name%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Percentage" HeaderText="Percentage" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href="TaxByStateProvinceEdit.aspx?TaxByStateProvinceID=<%#Eval("TaxByStateProvinceID")%>&StateProvinceID=<%#Eval("StateProvinceID")%>&TaxCategoryID=<%#Eval("TaxCategoryID")%>">
                        Edit </a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <br>
</asp:Content>
